package com.epam.web_project.bank.util;

import com.epam.web_project.bank.entity.Currency;

public class CurrencyStringConverter {
	public static String convertToString(Currency currency) {
		String res=null;
		if (currency==Currency.EUR) {
			res = "EUR";
		} else if (currency==Currency.USD) {
			res="USD";
		} else if (currency==Currency.KZT) {
			res="KZT";
		}
		return res;
	}
	
	public static Currency convertToCurrency(String currency) {
		Currency res = null;
		if ("EUR".equals(currency)) {
			res = Currency.EUR;
		} else if ("USD".equals(currency)) {
			res = Currency.USD;
		} else if ("KZT".equals(currency)) {
			res = Currency.KZT;
		}
		return res;
	}
}
